<?php

class XLogger {
	const FATAL   ='fatal';
	const RUNTIME ='runtime';
	const LOG     ='log';
	
	private $fatal=false, $runtime=false, $log=false;
	
	public function log ($msg, $type=self::LOG) {
		if(!$this->$type) {
			$this->$type = @fopen(DIR.'logs'.DS.$type.'.log');
		}
		
		@fwrite($this->$type, $msg);
	}
}